//
//  MSDetailTradeTableVC.m
//  SocietySale
//
//  Created by Mike on 16/11/8.
//  Copyright © 2016年 Mike. All rights reserved.
//

#import "MSDetailTradeTableVC.h"
#import "MSTradeCell.h"

@interface MSDetailTradeTableVC ()

@end

@implementation MSDetailTradeTableVC

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    NSString *cellId = @"cellId";
    MSTradeCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId];
    if (!cell) {
        cell = [[MSTradeCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:cellId];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
    }
    cell.model = self.dataArray[indexPath.row];
    return cell;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return [MSTradeCell cellHeightWithModel:self.dataArray[indexPath.row]];
}

//- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
//{
//    return 40;
//}
//
//- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
//    UIView *bgView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, SCREENWIDTH, 40)];
//    
//    NSArray *titleArr = [NSArray arrayWithObjects:@"类型",@"状态", nil];
//    self.imageMenu = [[HDImageMenuView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 40) titleArray:titleArr];
//    self.imageMenu.delegate = (id)self;
//    self.imageMenu.isHiddenBottomLine = NO;
//    [bgView addSubview:self.imageMenu];
//    
//    return bgView;
//}
//
//#pragma mark - HDMenuImageDelegate
//- (void)selectImageMenuIndex:(int)index{
//    if ([self.delegate respondsToSelector:@selector(clickImageMenuIndex:)]) {
//        [((id<MSHDImageMenuDelegate>)self.delegate) clickImageMenuIndex:index];
//    }
//}

- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView{
    if ([self.delegate respondsToSelector:@selector(scrollViewWillBeginDragging:)]) {
        [self.delegate performSelector:@selector(scrollViewWillBeginDragging:) withObject:self];
    }
}

@end
